<input type=file id=f>
<script>
// File objects received from other pages will be stored here:
var file;

var worker = new SharedWorker('worker.js');
document.getElementById('f').onchange = function() {
    worker.port.postMessage(this.files[0]);
};
worker.port.onmessage = function(e) {
    console.log(e.data);
    if (e.data instanceof File) {
        alert(e.data.lastModifiedDate + ' ' + e.data.size);
        // Store File as global variable for debugging.
        window.file = e.data;
    }
};
</script>

<ol>
    <li> Open this page in another window as well.
    <li> Select a file with the File chooser.
    <li> In the other window, you will get a dialog that shows "Invalid Date 0".<br>
    The file <em>should</em> have been transferred correctly, and the dialog
    should have displayed "(last modified date) (file size)".
    <li> Open the console and inspect the <code>file</code> variable to debug the issue.
</ol>
